var express = require('express');
var router = express.Router();
var collectModel = require('../../models/collect/collection');

//定义路由，当访问该路由的时候，去数据库查找信息并返回
router.post('/', function (req, res, next) {
    var params = req.body
    collectModel.remove({ openid: params.openid, order_id: params.order_id }, function (err) {
        if (!err) {
            res.json({ data: null, msg: '删除成功！', code: 200 })
        }
    })
})

module.exports = router;
